﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace PokeTD {

    class Bullet {
        private Texture2D _texture;
        private Vector2 _direction;
        private Vector2 _position;

        private bool _isOutOfRange;

        public Vector2 Direction {
            get { return _direction; }
            set { _direction = value; }
        }
        public Vector2 Position {
            get { return _position; }
            set { _position = value; }
        }
        public Vector2 Center {
            get { return _position + new Vector2(_texture.Width / 2, _texture.Height / 2); }
        }
        public bool isOutOfRange {
            get { return _isOutOfRange; }
            set { _isOutOfRange = value; }
        }


        public Bullet(Texture2D texture, Vector2 direction) {
            _texture = texture;
            _direction = direction;
            _isOutOfRange = false;
        }

        public void Update(GameTime gameTime) {
            Position += Direction*4;
        }

    }
}
